<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcCms.Web.ViewModels.BackOfficeModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Mvc Cms -
    <%=ViewData["PageTitle"]%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="contentpage-outerdiv">
        <span class="field-validation-error">&nbsp;<%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>
            <%=ViewData["message"].ToString()%>
        </span>
        <% using (Html.BeginForm("EditLanguage", "BackOffice", FormMethod.Post, new { id = "form1" }))
           {%>
        <fieldset>
            <legend>Edit Language</legend>
            <div>
                <table width="100%">
                    <tr>
                        <td width="70%">
                            <p>
                                <label for="Title">
                                    Name:</label>
                                <%= Html.TextBox("LanguageName", Model._Language.LanguageName, new { @class = "required" })%>
                                <%= Html.ValidationMessage("LanguageName", "")%>
                            </p>
                            <p>
                                <label for="Image Icon">
                                    Icon Image Name:</label>
                                <%= Html.TextBox("IconName", Model._Language.IconName, new { @class = "required" })%>
                                <%= Html.ValidationMessage("IconName", "")%>
                            </p>
                            <p>
                                <label for="Image Icon">
                                    Path ID:</label>
                                <%= Html.TextBox("PathID", Model._Language.PathID, new { @class = "required" })%>
                                <%= Html.ValidationMessage("PathID", "")%>
                            </p>                            
                            <p>
                                <%=Html.Hidden("LanguageID", Model._Language.LanguageID) %>
                                <input type="submit" value="Save" />
                            </p>
                        </td>
                    </tr>
                </table>
            </div>
        </fieldset>
        <% } %>
        <div>
            <%=Html.ActionLink("Back to List", "ManageLanguages") %>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <style type="text/css">
        .style1
        {
            color: #FF3300;
            font-weight: bold;
            font-size: large;
        }
    </style>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ScriptContent" runat="server">

    <script src="../../Scripts/jquery.validate.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        $("#form1").validate({
            submitHandler: function(form) {
                form.submit();
            }
        });
        
    
    
    </script>

</asp:Content>
